package com.threeox.commonlibrary.entity.engine.model.table;

import com.threeox.commonlibrary.entity.base.BaseObj;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @ClassName: TableResultMessage
 * 
 * @Description: TODO(表格数据结果的信息)
 * 
 * @author 赵屈犇
 * 
 * @date 创建时间: 2017/8/14 18:17
 * 
 * @version 1.0
 * 
 */
public class TableResultMessage<T> extends BaseObj {

    private Long count;// 数据总和
    private Long pageSize;// 总页数
    private List<T> datas;// 数据结果
    private List<String> columnNames;// 列名称的集合

    public Long getCount() {
        return count;
    }

    public void setCount(Long count) {
        this.count = count;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getDatas() {
        return datas;
    }

    public void setDatas(List<T> datas) {
        this.datas = datas;
    }

    public List<String> getColumnNames() {
        return columnNames;
    }

    public void setColumnNames(List<String> columnNames) {
        this.columnNames = columnNames;
    }

    public void addColumnName(String columnName) {
        if (columnNames == null) {
            columnNames = new ArrayList<>();
        }
        columnNames.add(columnName);
    }

}
